package com.ysu.his.utils;

import com.ysu.his.entity.user.User;

public class AuthContextUtil
{
    private static final ThreadLocal<User> threadLocal=new ThreadLocal<>();

    //添加数据
    public static void set(User user)
    {
        threadLocal.set(user);
    }

    //获取数据
    public static User get()
    {
        return threadLocal.get();
    }

    //删除数据
    public static void reomve()
    {
        threadLocal.remove();
    }

}
